#!/usr/bin/env python3
# -*- coding:utf-8 -*-
# Author:liang futing
#@Time :2019/4/4 11:45

from django.forms import Form,ModelForm
from web.models import Customer

class CustomerForm(ModelForm):
    class Meta:
        model=Customer
        fields='__all__'

    def __init__(self,*args,**kwargs):
        super(CustomerForm,self).__init__(*args,**kwargs)
        for name,field in self.fields.items():
            field.widget.attrs['class']='form-control'
            field.widget.attrs['placeholder']=field.label

